package com.imooc.order.uitl;

import java.util.Random;

/**
 * @Name com.imooc.order.uitl.KeyUtil
 * @Description
 * @Author Elwyn
 * @Version 2020/3/17
 * @Copyright 上海云辰信息科技有限公司
 **/
public class KeyUtil {
	/*
	生成唯一的主键
	 */

	public static synchronized String genUniqueKey() {
		Random random = new Random();
		int i = random.nextInt(900000) + 100000;
		return System.currentTimeMillis() + String.valueOf(i);
	}
}
